package com.niiwoo.civet.mobile.vo.request.creditor;

import java.math.BigDecimal;
import java.util.List;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
@ApiModel("债权出让申请")
public class CreditorSaleApplyRequestVO {
	
	@NotNull(message = "转让总金额不能为空")
	@ApiModelProperty(value = "转让总金额")
    @DecimalMin(value="0",message = "转让总金额不能小于0")
	private BigDecimal totalSaleAmount;
	
	@ApiModelProperty(value = "批量操作标示 0：否；1：是")
	private Byte isBatch;
	
	@NotEmpty(message = "债权出让详情不能为空")
	@ApiModelProperty(value = "债权出让详情")
	private List<CreditorSaleApplyDetailVO> creditorSaleApplyDetailVOList;

	@Setter
	@Getter
	@ApiModel("债权出让申请详情信息")
	public static class CreditorSaleApplyDetailVO {
		@NotNull(message = "出让投资订单号investOrderId不能为空")
	    @ApiModelProperty(value = "投资订单号", required = true)
	    private Long investOrderId;

		@NotNull(message = "转让价格不能为空")
	    @ApiModelProperty(value = "转让价格", required = true)
	    @DecimalMin(value="0",message = "转让金额不能小于0")
	    private BigDecimal amount;
	    
		@NotNull(message = "降价比例不能为空")
		@ApiModelProperty(value="降价比例", required = true)
		@DecimalMin(value="0", message = "降价比例不能小于0")
		private BigDecimal offPercent;
		
		@NotNull(message = "手续费率不能为空")
		@ApiModelProperty(value="手续费率", required = true)
		@DecimalMin(value="0", message = "手续费率不能小于0")
		private BigDecimal expenseRate;
	}
}